# coding: utf-8
from PySide6.QtWidgets import QApplication

from common import isWin11, SingleIcon
from components import VideoTitleBar

if isWin11():
    from qframelesswindow import AcrylicWindow as Window
else:
    from qframelesswindow import FramelessWindow as Window


class VideoWindow(Window):
    def __init__(self, parent=None):
        super().__init__(parent)

        self.__initWidgets()
        self.__connectSignals()

    def __initWidgets(self):
        self.setMinimumSize(1000, 700)
        self.setTitleBar(VideoTitleBar(self))
        self.setWindowTitle("Video Player")
        # self.setWindowIcon(SingleIcon.BILIBILI.icon())

        desktop = QApplication.screens()[0].availableGeometry()
        w, h = desktop.width(), desktop.height()
        self.move(w // 2 - self.width() // 2, h // 2 - self.height() // 2)

    def __connectSignals(self):
        pass
